<include file="Layout/header" />
<body>
<div class="breadcrumbs" id="breadcrumbs"> 
  <script type="text/javascript">
							try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
						</script>
  <ul class="breadcrumb">
    <li> <i class="icon-home home-icon"></i> <a href="{:U('Admin/Index/welcome')}">首页</a> </li>
    <li class="active">结算</li>
  </ul>
</div>
<div class="page-content">
  <div class="page-header">
    <h1> 彩票管理 <small> <i class="icon-double-angle-right"></i> 结算 </small> </h1>
  </div>
  <div class="row">
   
    <div class="col-xs-12">
    <!--  <a class="btn btn-primary" style="margin-bottom: 5px;" href="{:U('Admin/Member/member_add')}"><i class="icon-plus align-top bigger-125"></i>新增会员</a>-->
      <div class="table-responsive">
        
        <div>
         
          <button class="btn btn-primary" onClick="balance_a(1)">结算六合彩</button>
          <button class="btn  btn-primary" onClick="balance_a(2)">结算时时彩</button>
          <button class="btn  btn-primary" onClick="balance_a(3)">结算分分彩</button>
        </div>
      </div>
      <input type="hidden" value="{:U('Admin/lottryodds/Js')}" id="js">
      
    
      <!-- /.table-responsive --> 
    </div>
  
  </div>
</div>
<include file="Layout/js"/> 
<link href="__ADMIN_CSS__/datepicker.css" rel="stylesheet" />
<script src="__ADMIN_JS__/date-time/bootstrap-datepicker.min.js"></script>
<script src="__ADMIN_JS__/jquery.ui.touch-punch.min.js"></script>
<script src="__ADMIN_JS__/jquery.dataTables.min.js"></script> 
<script src="__ADMIN_JS__/jquery.dataTables.bootstrap.js"></script> 
<script src="__ADMIN_JS__/bootbox.js"></script> 
<script type="text/javascript">
			jQuery(function($) {
				$("#datepicker").datepicker({
					showOtherMonths: true,
					selectOtherMonths: false,
					 
				});
				 
				$("#datepicker1").datepicker({
					showOtherMonths: true,
					selectOtherMonths: false,
					 
				}); 
				
				var oTable1 = $('#sample-table-2').dataTable( {
				"aoColumns": [
			      { "bSortable": false },
			      null, null,null, null, null,
				  { "bSortable": false }
				] } );
				
				
				$('table th input:checkbox').on('click' , function(){
					var that = this;
					$(this).closest('table').find('tr > td:first-child input:checkbox')
					.each(function(){
						this.checked = that.checked;
						$(this).closest('tr').toggleClass('selected');
					});
						
				});
			
  				
			})
 		</script> 
<script type="text/javascript">       
/*批量-结算*/
function balance_a(type){
	if(type==1){
	var title='六合彩';
	}else if(type==2){
	var title='时时彩';
	}else{
	var title='分分彩';
	}
	 var host=$("#js").val();
	 bootbox.setLocale("zh_CN");  
     bootbox.confirm("确定要结算"+title+"吗?", function(result) {  
       if (result) {
		$.ajax({
			url:host,
			type:"GET",
			dataType:"json",
			data:{type:type},
			success: function(s){
				bootbox.alert('所有'+title+'已结算!');
				}
			});
		
		
		}
	});

}

 </script>
</body>
</html>